// 本地存储对象数据的封装
export const set = (name,value) => {
  localStorage[name] = JSON.stringify(value);
}
export const get = name => {
  if(localStorage[name]) 
  return JSON.parse(localStorage[name])
  else return {}
}
export const remove = name => {
  localStorage.removeItem(name)
}
export const clear = () => {
  localStorage.clear();
}